package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 窄化请求 Handler方法上映射的URL：类上的@RequestMapping的value属性值 + 方法上的@RequestMapping的value属性值
 * 会自动拼接两者之间的/
 * @author stone
 * @date 2022/06/21 10:18
 */
@Controller
@RequestMapping("user")
public class UserController {

    //@RequestMapping("user/login")
    @RequestMapping("login")
    @ResponseBody
    public String login() {
        return "login";
    }
    //@RequestMapping("user/register")
    @RequestMapping("register")
    @ResponseBody
    public String register() {
        return "register";
    }
    //@RequestMapping("user/modify")
    @RequestMapping("modify")
    @ResponseBody
    public String modify() {
        return "modify";
    }
    //@RequestMapping("user/remove")
    @RequestMapping("remove")
    @ResponseBody
    public String remove() {
        return "remove";
    }
}
